#ifndef COMMON_INPUT_KEYBOARD_KEYS_H
#define COMMON_INPUT_KEYBOARD_KEYS_H


// Taken from SDL_keycode.h


/*
    SDL - Simple DirectMedia Layer
    Copyright (C) 1997-2011 Sam Lantinga

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

    Sam Lantinga
    slouken@libsdl.org
*/


namespace Keyboard
{
    enum Keys
    {
        kUnknown = 0,

        /** 
         *  \name Usage page 0x07
         *  
         *  These values are from usage page 0x07 (USB keyboard page).
         */
        /*@{*/

        kA = 4,
        kB = 5,
        kC = 6,
        kD = 7,
        kE = 8,
        kF = 9,
        kG = 10,
        kH = 11,
        kI = 12,
        kJ = 13,
        kK = 14,
        kL = 15,
        kM = 16,
        kN = 17,
        kO = 18,
        kP = 19,
        kQ = 20,
        kR = 21,
        kS = 22,
        kT = 23,
        kU = 24,
        kV = 25,
        kW = 26,
        kX = 27,
        kY = 28,
        kZ = 29,

        k1 = 30,
        k2 = 31,
        k3 = 32,
        k4 = 33,
        k5 = 34,
        k6 = 35,
        k7 = 36,
        k8 = 37,
        k9 = 38,
        k0 = 39,

        kReturn = 40,
        kEscape = 41,
        kBackspace = 42,
        kTab = 43,
        kSpace = 44,

        kMinus = 45,
        kEquals = 46,
        kLeftBracket = 47,
        kRightBracket = 48,
        kBackslash = 49, /**< Located at the lower left of the return 
                                      *   key on ISO keyboards and at the right end 
                                      *   of the QWERTY row on ANSI keyboards. 
                                      *   Produces REVERSE SOLIDUS (backslash) and 
                                      *   VERTICAL LINE in a US layout, REVERSE 
                                      *   SOLIDUS and VERTICAL LINE in a UK Mac 
                                      *   layout, NUMBER SIGN and TILDE in a UK 
                                      *   Windows layout, DOLLAR SIGN and POUND SIGN
                                      *   in a Swiss German layout, NUMBER SIGN and 
                                      *   APOSTROPHE in a German layout, GRAVE 
                                      *   ACCENT and POUND SIGN in a French Mac 
                                      *   layout, and ASTERISK and MICRO SIGN in a 
                                      *   French Windows layout.
                                      */
        kNonUsHash = 50, /**< ISO USB keyboards actually use this code 
                                      *   instead of 49 for the same key, but all 
                                      *   OSes I've seen treat the two codes 
                                      *   identically. So, as an implementor, unless
                                      *   your keyboard generates both of those 
                                      *   codes and your OS treats them differently,
                                      *   you should generate kBACKSLASH
                                      *   instead of this code. As a user, you 
                                      *   should not rely on this code because SDL 
                                      *   will never generate it with most (all?) 
                                      *   keyboards. 
                                      */
        kSemicolon = 51,
        kApostrophe = 52,
        kGrave = 53, /**< Located in the top left corner (on both ANSI 
                                  *   and ISO keyboards). Produces GRAVE ACCENT and 
                                  *   TILDE in a US Windows layout and in US and UK 
                                  *   Mac layouts on ANSI keyboards, GRAVE ACCENT 
                                  *   and NOT SIGN in a UK Windows layout, SECTION 
                                  *   SIGN and PLUS-MINUS SIGN in US and UK Mac 
                                  *   layouts on ISO keyboards, SECTION SIGN and 
                                  *   DEGREE SIGN in a Swiss German layout (Mac: 
                                  *   only on ISO keyboards), CIRCUMFLEX ACCENT and 
                                  *   DEGREE SIGN in a German layout (Mac: only on 
                                  *   ISO keyboards), SUPERSCRIPT TWO and TILDE in a
                                  *   French Windows layout, COMMERCIAL AT and 
                                  *   NUMBER SIGN in a French Mac layout on ISO 
                                  *   keyboards, and LESS-THAN SIGN and GREATER-THAN
                                  *   SIGN in a Swiss German, German, or French Mac 
                                  *   layout on ANSI keyboards.
                                  */
        kComma = 54,
        kPeriod = 55,
        kSlash = 56,

        kCapsLock = 57,

        kF1 = 58,
        kF2 = 59,
        kF3 = 60,
        kF4 = 61,
        kF5 = 62,
        kF6 = 63,
        kF7 = 64,
        kF8 = 65,
        kF9 = 66,
        kF10 = 67,
        kF11 = 68,
        kF12 = 69,

        kPrintScreen = 70,
        kScrollLock = 71,
        kPause = 72,
        kInsert = 73, /**< insert on PC, help on some Mac keyboards (but
                                       does send code 73, not 117) */
        kHome = 74,
        kPageUp = 75,
        kDelete = 76,
        kEnd = 77,
        kPageDown = 78,
        kRight = 79,
        kLeft = 80,
        kDown = 81,
        kUp = 82,

        kNumLockClear = 83, /**< num lock on PC, clear on Mac keyboards 
                                         */
        kKeyPadDivide = 84,
        kKeyPadMultiply = 85,
        kKeyPadMinus = 86,
        kKeyPadPlus = 87,
        kKeyPadEnter = 88,
        kKeyPad1 = 89,
        kKeyPad2 = 90,
        kKeyPad3 = 91,
        kKeyPad4 = 92,
        kKeyPad5 = 93,
        kKeyPad6 = 94,
        kKeyPad7 = 95,
        kKeyPad8 = 96,
        kKeyPad9 = 97,
        kKeyPad0 = 98,
        kKeyPadPeriod = 99,

        kNonUsBackslash = 100, /**< This is the additional key that ISO 
                                            *   keyboards have over ANSI ones, 
                                            *   located between left shift and Y. 
                                            *   Produces GRAVE ACCENT and TILDE in a
                                            *   US or UK Mac layout, REVERSE SOLIDUS
                                            *   (backslash) and VERTICAL LINE in a 
                                            *   US or UK Windows layout, and 
                                            *   LESS-THAN SIGN and GREATER-THAN SIGN
                                            *   in a Swiss German, German, or French
                                            *   layout. */
        kApplication = 101, /**< windows contextual menu, compose */
        kPower = 102, /**< The USB document says this is a status flag, 
                                   *   not a physical key - but some Mac keyboards 
                                   *   do have a power key. */
        kKeyPadEquals = 103,
        kF13 = 104,
        kF14 = 105,
        kF15 = 106,
        kF16 = 107,
        kF17 = 108,
        kF18 = 109,
        kF19 = 110,
        kF20 = 111,
        kF21 = 112,
        kF22 = 113,
        kF23 = 114,
        kF24 = 115,
        kExecute = 116,
        kHelp = 117,
        kMenu = 118,
        kSelect = 119,
        kStop = 120,
        kAgain = 121,   /**< redo */
        kUndo = 122,
        kCut = 123,
        kCopy = 124,
        kPaste = 125,
        kFind = 126,
        kMute = 127,
        kVolumeUp = 128,
        kVolumeDown = 129,
    /* not sure whether there's a reason to enable these */
    /*     kLOCKINGCAPSLOCK = 130,  */
    /*     kLOCKINGNUMLOCK = 131, */
    /*     kLOCKINGSCROLLLOCK = 132, */
        kKeyPadComma = 133,
        kKeyPadEqualsAs400 = 134,

        kInternational1 = 135, /**< used on Asian keyboards, see 
                                                footnotes in USB doc */
        kInternational2 = 136,
        kInternational3 = 137, /**< Yen */
        kInternational4 = 138,
        kInternational5 = 139,
        kInternational6 = 140,
        kInternational7 = 141,
        kInternational8 = 142,
        kInternational9 = 143,
        kLang1 = 144, /**< Hangul/English toggle */
        kLang2 = 145, /**< Hanja conversion */
        kLang3 = 146, /**< Katakana */
        kLang4 = 147, /**< Hiragana */
        kLang5 = 148, /**< Zenkaku/Hankaku */
        kLang6 = 149, /**< reserved */
        kLang7 = 150, /**< reserved */
        kLang8 = 151, /**< reserved */
        kLang9 = 152, /**< reserved */

        kAltErase = 153, /**< Erase-Eaze */
        kSysReq = 154,
        kCancel = 155,
        kClear = 156,
        kPrior = 157,
        kReturn2 = 158,
        kSeparator = 159,
        kOut = 160,
        kOper = 161,
        kClearAgain = 162,
        kCrsel = 163,
        kExsel = 164,

        kKeyPad00 = 176,
        kKeyPad000 = 177,
        kThousandsSeparator = 178,
        kDecimalSeparator = 179,
        kCurrencyUnit = 180,
        kCurrencySubunit = 181,
        kKeyPadLeftParen = 182,
        kKeyPadRightParen = 183,
        kKeyPadLeftBrace = 184,
        kKeyPadRightBrace = 185,
        kKeyPadTab = 186,
        kKeyPadBackspace = 187,
        kKeyPadA = 188,
        kKeyPadB = 189,
        kKeyPadC = 190,
        kKeyPadD = 191,
        kKeyPadE = 192,
        kKeyPadF = 193,
        kKeyPadXor = 194,
        kKeyPadPower = 195,
        kKeyPadPercent = 196,
        kKeyPadLess = 197,
        kKeyPadGreater = 198,
        kKeyPadAmpersand = 199,
        kKeyPadDblAmpersand = 200,
        kKeyPadVerticalBar = 201,
        kKeyPadDblVerticalBar = 202,
        kKeyPadColon = 203,
        kKeyPadHash = 204,
        kKeyPadSpace = 205,
        kKeyPadAt = 206,
        kKeyPadExclam = 207,
        kKeyPadMemStore = 208,
        kKeyPadMemRecall = 209,
        kKeyPadMemClear = 210,
        kKeyPadMemAdd = 211,
        kKeyPadMemSubtract = 212,
        kKeyPadMemMultiply = 213,
        kKeyPadMemDivide = 214,
        kKeyPadPlusMinus = 215,
        kKeyPadClear = 216,
        kKeyPadClearEntry = 217,
        kKeyPadBinary = 218,
        kKeyPadOctal = 219,
        kKeyPadDecimal = 220,
        kKeyPadHexadecimal = 221,

        kLeftCtrl = 224,
        kLeftShift = 225,
        kLeftAlt = 226, /**< alt, option */
        kLeftGui = 227, /**< windows, command (apple), meta */
        kRightCtrl = 228,
        kRightShift = 229,
        kRightAlt = 230, /**< alt gr, option */
        kRightGui = 231, /**< windows, command (apple), meta */

        kMode = 257,    /**< I'm not sure if this is really not covered 
                                     *   by any of the above, but since there's a 
                                     *   special KMOD_MODE for it I'm adding it here
                                     */
        
        /*@}*//*Usage page 0x07*/

        /**
         *  \name Usage page 0x0C
         *  
         *  These values are mapped from usage page 0x0C (USB consumer page).
         */
        /*@{*/

        kAudioNext = 258,
        kAudioPrev = 259,
        kAudioStop = 260,
        kAudioPlay = 261,
        kAudioMute = 262,
        kMediaSelect = 263,
        kWww = 264,
        kMail = 265,
        kCalculator = 266,
        kComputer = 267,
        kAcSearch = 268,
        kAcHome = 269,
        kAcBack = 270,
        kAcForward = 271,
        kAcStop = 272,
        kAcRefresh = 273,
        kAcBookmarks = 274,
        
        /*@}*//*Usage page 0x0C*/

        /**
         *  \name Walther keys
         *  
         *  These are values that Christian Walther added (for mac keyboard?).
         */
        /*@{*/

        kBrightnessDown = 275,
        kBrightnessUp = 276,
        kDisplaySwitch = 277, /**< display mirroring/dual display 
                                               switch, video mode switch */
        kKbdIllumToggle = 278,
        kKbdIllumDown = 279,
        kKbdIllumUp = 280,
        kEject = 281,
        kSleep = 282,
        
        /*@}*//*Walther keys*/

        /* Add any other keys here. */

        kKeyCount = 512 /**< not a key, just marks the number of scancodes 
                                     for array bounds */
    };

}


#endif
